﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package de.polygonal.ds {

    public class DListNode implements LinkedListNode {

        public var data;
        public var next:DListNode;
        public var prev:DListNode;

        public function DListNode(_arg1){
            this.next = (this.prev = null);
            this.data = _arg1;
        }
        public function insertAfter(_arg1:DListNode):void{
            _arg1.next = this.next;
            _arg1.prev = this;
            if (this.next){
                this.next.prev = _arg1;
            };
            this.next = _arg1;
        }
        public function insertBefore(_arg1:DListNode):void{
            _arg1.next = this;
            _arg1.prev = this.prev;
            if (this.prev){
                this.prev.next = _arg1;
            };
            this.prev = _arg1;
        }
        public function unlink():void{
            if (this.prev){
                this.prev.next = this.next;
            };
            if (this.next){
                this.next.prev = this.prev;
            };
            this.next = (this.prev = null);
        }
        public function toString():String{
            return ((("[DListNode, data=" + this.data) + "]"));
        }

    }
}//package de.polygonal.ds 
